home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 7 / Eagles_Nest_Mac_Collection_Disc_7.TOAST / General Communication / T3000ARA < prev    next >
Text File  |  1992-02-04  |  8KB  |  329 lines

  1. ! "Telebit T3000 Modem 11/11/91" JFK
  2. ! 11/14/91 JFK - Added a ton o' comments...
  3. ! 11/23/91 JFK - Cleaned up comments a little bit more,
  4. !                and added S11=50 again.
  5. ! 12/2/91  JFK - Took S11 back out again.
  6. ! 12/9/91  JFK - Added the pinouts for the RTS/CTS cable to the comments
  7. !                Since you have to make a hardware handshaking cable.
  8. ! 1/16/92  JFK - Add a bunch more comments about the cable.
  9. !
  10. ! Cable needed for the Telebit T3000.
  11. !  Din-8    DB-25
  12. ! 1 (DTR)   4,20 (RTS, DTR)
  13. ! 2 (CTS)   5 (CTS) ** Note, normally 2(CTS)->6 (DSR) on other mac cables.
  14. ! 3 (TxD-)  2 (TD)
  15. ! 4 (SG)    7 (SG)
  16. ! 5 (RxD-)  3 (RD)
  17. ! 6 (TxD+)  Not Connected
  18. ! 7 (GPi)   8 (DCD)
  19. ! 8 (RxD+)  7 (SG)
  20. !  
  21. !  Note: The downside of the above cable is that DSR from the modem
  22. !        is no longer connected to the Mac.  This does not let your
  23. !        Macintosh communication software use the DSR signal to detect
  24. !        carrier loss.  And since the Macintosh Serial driver does not
  25. !        support the GPi input...you are sort of stuck, unless
  26. !        your communications software does use the GPi input.  Or
  27. !        Apple builds GPi support into the serial driver.
  28. !
  29. !  Note: Since you are tying DTR and RTS together, you must tell the modem to
  30. !        ignore DTR (&D0) when using this cable with other communications
  31. !        applications.  Otherwise, if you use RTS handshaking from the Mac,
  32. !        the modem will drop connection the first time the Mac asserts
  33. !        RTS to the modem.
  34. !
  35. !        OR
  36. !
  37. !        If you want to use DTR to make the modem disconnect, you can
  38. !        use only CTS handshaking from the modem to the Macintosh.
  39. !        This is what ARA does so it can force the modem to hang up,
  40. !        and the modem can tell the Macintosh to stop sending data.
  41. !        This assumes that the Macintosh will always be able to accept
  42. !        data from the modem (which will not be true if you are talking
  43. !        to the modem at 57.6KBps with V.42Bis.  There will be times
  44. !        when the Macintosh will need to hold off the data from the modem).
  45. !
  46. !        In summary, with this cable:
  47. !
  48. !          If you want to have full hardware handshaking (CTS/RTS), you
  49. !          cannot use DTR to control the modem, and you must set the
  50. !          modem to ignore DTR.
  51. !
  52. !          If you want to control the modem with DTR, you can only have
  53. !          CTS hardware handshaking so the modem can tell the Macintosh
  54. !          to stop sending data.
  55. !
  56. @ORIGINATE
  57. @ANSWER
  58. !
  59. ! Talk to the modem at 19,200 bps.  the T3000 should auto-baud this
  60. ! unless the user has locked the port to a particular speed.  If it
  61. ! is locked to a different speed, the user will need to change that.
  62. !
  63. serreset 19200, 0, 8, 1
  64. !
  65. ! First recall the factory configuration
  66. ! F9 is the built in preconfigured setting for CTS/RTS handshaking.
  67. ! Since it's possible for the user to modify F0 parameters, this is a 
  68. ! little safer.
  69. !
  70. ! AT&F9 sets:
  71. ! &C1 - DCD is on after connect
  72. ! &D2 - DTR on/off disconnects
  73. ! S58=2 - Use RTS/CTS flow control in full-duplex mode
  74. !
  75. settries 0
  76. matchclr
  77. @LABEL 1
  78. matchstr 1 4 "OK\13\10"
  79. write "AT&F9\13"
  80. matchread 30
  81. inctries
  82. iftries 2 59
  83. ! Modem is not responding, reset and send a break
  84. DTRClear
  85. pause 5
  86. DTRSet
  87. SBreak
  88. jump 1
  89. !
  90. ! Next, Set up the configuration: drop connection after losing DTR
  91. !    Turn off auto answer and command echo.
  92. !
  93. ! &D3 - DTR on/off resets modem 
  94. ! S0=0 - Don't answer calls
  95. ! E0 - Turn command echo off
  96. @LABEL 4
  97. matchclr
  98. pause 5
  99. matchstr 1 5 "OK\13\10"
  100. write "AT&D3S0=0E0\13"
  101. matchread 30
  102. jump 59
  103. !
  104. ! Next, disable MNP and error control
  105. ! turn on internal buffering (for V.32bis),
  106. ! and extended result codes (CTS/RTS flow control was set when we
  107. !                            issued &F9, so we don't need to
  108. !                            do it here).
  109. !
  110. ! S180=0 - Turn off all error detection/correction (ARA does MNP and
  111. !          compression itself.  It needs these turned off in the modem).
  112. ! S181=1 - Turn *on* DTE <-> line buffering if there is no error control
  113. !                            (which there is not).  Since we will be
  114. !                            talking to the Mac at 19,200 bps no matter
  115. !                            what speed we connect at, we need this on.
  116. ! X2 - Issue extended result codes.  This will display busy, connect XXX, etc.
  117. !      X2 will say "CONNECT XXX"  Where XXX is the line speed (as opposed to
  118. !      DTE speed).  We need this so we can tell ARA what speed we are really 
  119. !      communicating at (for timing).
  120. !
  121. @LABEL 5
  122. pause 5
  123. matchstr 1 6 "OK\13\10"
  124. write "ATS180=0S181=1X2\13"
  125. matchread 30
  126. jump 59
  127. !
  128. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  129. !
  130. @LABEL 6
  131. ifstr 2 8 "1"
  132. pause 5
  133. matchstr 1 8 "OK\13\10"
  134. write "ATM0\13"
  135. matchread 30
  136. jump 59
  137. !
  138. ! The modem is ready so enable answering, or originate a call
  139. !
  140. @LABEL 8
  141. pause 5
  142. ifANSWER 30
  143. note "Dialing ^1" 3
  144. write "ATDT^1\13"
  145. !
  146. @LABEL 9
  147. matchstr 1  11 "CONNECT 1200\13\10"
  148. matchstr 2  12 "CONNECT 2400\13\10"
  149. matchstr 3  13 "CONNECT 4800\13\10"
  150. matchstr 4  19 "CONNECT 7200\13\10"
  151. matchstr 5  14 "CONNECT 9600\13\10"
  152. matchstr 6  20 "CONNECT 12000\13\10"
  153. matchstr 7  18 "CONNECT 14400\13\10"
  154. matchstr 8  50 "NO CARRIER\13\10"
  155. matchstr 9  50 "ERROR\13\10"
  156. matchstr 10 52 "NO DIAL TONE\13\10"
  157. matchstr 11 53 "BUSY\13\10"
  158. matchstr 12 54 "NO ANSWER\13\10"
  159. matchread 700
  160. jump 59
  161. !
  162. ! Notice that all we do for different connect speeds is issue a 
  163. ! "CommunicatingAt" command.  Remember, we locked the interface speed
  164. ! to 19,200 bps so we don't want to reset the serial speed after we connect.
  165. ! CommuicatingAt tells ARA what the actual line speed is so that it
  166. ! can set it's timers appropriately.  I guess your performance would be
  167. ! sub-optimal if you don't set this...
  168. !
  169. @LABEL 11
  170. note "Communicating at 1200 bps." 2
  171. CommunicatingAt 1200
  172. jump 15
  173. !
  174. @LABEL 12
  175. note "Communicating at 2400 bps." 2
  176. CommunicatingAt 2400
  177. jump 15
  178. !
  179. @LABEL 13
  180. note "Communicating at 4800 bps." 2
  181. CommunicatingAt 4800
  182. jump 15
  183. !
  184. @LABEL 19
  185. note "Communicating at 7200 bps." 2
  186. CommunicatingAt 7200
  187. jump 15
  188. !
  189. @LABEL 14
  190. note "Communicating at 9600 bps." 2
  191. CommunicatingAt 9600
  192. jump 15
  193. !
  194. @LABEL 20
  195. note "Communicating at 12000 bps." 2
  196. CommunicatingAt 12000
  197. jump 15
  198. !
  199. @LABEL 18
  200. note "Communicating at 14400 bps." 2
  201. CommunicatingAt 14400
  202. jump 15
  203. !
  204. ! Set CTS handshaking ON in the serial port (that's the 1 in the HSReset
  205. ! command below )
  206. !
  207. @LABEL 15
  208. HSReset 0 1 0 0 0 0 
  209. ifANSWER 16
  210. pause 30
  211. @LABEL 16
  212. exit 0
  213. !
  214. ! @ANSWER
  215. ! Set up the modem to answer
  216. !
  217. @LABEL 30
  218. write "ATS0=1\13"
  219. matchstr 1 31 "OK\13\10"
  220. matchread 30
  221. jump 59
  222. !
  223. @LABEL 31
  224. matchstr 1  32 "RING\13\10"
  225. matchstr 2  11 "CONNECT 1200\13\10"
  226. matchstr 3  12 "CONNECT 2400\13\10"
  227. matchstr 4  13 "CONNECT 4800\13\10"
  228. matchstr 5  19 "CONNECT 7200\13\10"
  229. matchstr 6  14 "CONNECT 9600\13\10"
  230. matchstr 7  20 "CONNECT 12000\13\10"
  231. matchstr 8  18 "CONNECT 14400\13\10"
  232. matchstr 9  50 "NO CARRIER\13\10"
  233. matchstr 10 50 "ERROR\13\10"
  234. matchstr 11 52 "NO DIAL TONE\13\10"
  235. matchstr 12 53 "BUSY\13\10"
  236. matchstr 13 54 "NO ANSWER\13\10"
  237. matchread 700
  238. jump 31
  239. !
  240. @LABEL 32
  241. userhook 1
  242. note "Answering phone..." 2
  243. jump 31
  244. !
  245. ! 50: error messages
  246. !
  247. @LABEL 50
  248. exit -6021
  249. !
  250. @LABEL 52
  251. exit -6020
  252. !
  253. @LABEL 53
  254. exit -6022
  255. !
  256. @LABEL 54
  257. exit -6023
  258. !
  259. @LABEL 59
  260. exit -6019
  261. !
  262. ! Hang up the modem
  263. !
  264. @HANGUP
  265. @LABEL 60
  266. settries 0
  267. HSReset 0 0 0 0 0 0 
  268. @LABEL 61
  269. write "ATH\13"
  270. matchclr
  271. matchstr 1 63 "NO CARRIER\13\10"
  272. matchstr 2 63 "OK\13\10"
  273. matchstr 3 63 "ERROR\13\10"
  274. matchread 30
  275. inctries
  276. iftries 3 63
  277. ! no response, try escape sequence
  278. write "+++"
  279. matchclr
  280. matchstr 1 62 "OK\13\10"
  281. matchread 15
  282. !
  283. ! No Response from modem, toggle DTR
  284. !
  285. DTRClear
  286. pause 5
  287. DTRSet
  288. jump 61
  289. !
  290. @LABEL 62
  291. ! Pause 1 second before to ensure we meet the escape time delay
  292. pause 10
  293. Flush
  294. write "ATH\13"
  295. matchstr 1 63 "OK\13\10"
  296. matchstr 2 63 "NO CARRIER\13\10"
  297. matchstr 3 63 "ERROR\13\10"
  298. matchread 30
  299. jump 61
  300. !
  301. !
  302. ! recall the factory settings.  Use &F9 again (see note at top of script)
  303. !
  304. @LABEL 63
  305. matchclr
  306. matchstr 1 64 "OK\13\10"
  307. pause 15
  308. write "AT&F9\13"
  309. matchread 30
  310. !
  311. ! Turn off auto answer, set S51 so modem will check interface
  312. ! speed on next connection.  If you don't do this, the modem
  313. ! will not try to autobaud, with the result being it exits the 
  314. ! script with an error
  315. ! S51=255 - Autobaud (9600 bps default)
  316. ! S0=0 - Don't try to answer the phone
  317. !
  318. @LABEL 64
  319. pause 5
  320. matchstr 1 65 "OK\13\10"
  321. write "ATS51=255S0=0\13"
  322. matchread 20
  323. !
  324. @LABEL 65
  325. exit 0
  326.  
  327.